﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace bmapi.Models.DataEntity
{
    public class RespondModel
    {
        public int status { get; set; }
        public string tip { get; set; }
        public data data { get; set; }

        public RespondModel() { }
        public RespondModel(int status, string tip)
        {
            this.status = status;
            this.tip = tip;
            data = null;
        }
        public RespondModel(int status, string tip, data dta)
        {
            this.status = status;
            this.tip = tip;
            data = dta;
        }
    }
    public class data
    {
        public int total { get; set; }
        public List<object> rows { get; set; }
        public data() { }
        public data(int ta, List<object> list)
        {
            total = ta;
            rows = list;
        }
    }

    //请求参数
    public class RequestModel
    {
        public int page { get; set; }
        public int limit { get; set; }
        public string name { get; set; }
        public string brand { get; set; }
        public string orderNo { get; set; }
        public string type { get; set; }
        public DateTime sTime { get; set; }
        public DateTime eTime { get; set; }
        public int qty { get; set; }
        public RequestModel()
        {
            page = 1;
            limit = 15;
            name = null;
            brand = null;
            orderNo = null;
            type = null;
            sTime = DateTime.Now.AddYears(-20);
            eTime = DateTime.Now;
            this.qty = -1;
        }
        //款式查询
        public RequestModel(int page, int limit, string name, string brand, string type, DateTime stime, DateTime etime)
        {
            this.page = page;
            this.limit = limit;
            this.name = name;
            this.brand = brand;
            this.type = type;
            this.sTime = stime;
            this.eTime = etime;
            this.orderNo = "";
        }
        //生产单查询
        public RequestModel(int page, int limit, string name, string brand, string orderno, int qty, DateTime stime, DateTime etime)
        {
            this.page = page;
            this.limit = limit;
            this.name = name;
            this.brand = brand;
            this.orderNo = orderNo;
            this.qty = qty;
            this.sTime = stime;
            this.eTime = etime;
        }
    }
}